package cn.demo.service1;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.core.env.Environment;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication(scanBasePackages = "cn.demo.service1")
//@EnableEurekaClient
@EnableDiscoveryClient

@EnableWebMvc
@EnableFeignClients // 可注入外部服务引用接口
@EnableCircuitBreaker // 可熔断
public class Application {

    public static void main(String[] args) {
        // args = new String[]{"debug"}; // EurekaClient
        Environment env = SpringApplication.run(Application.class, args).getEnvironment();
        System.out.println("Application1.env.from:" + env.getProperty("from"));
    }
}
